﻿/*
*用户列表页
*/
Ext.define('LNA.view.system.user.View', {
    extend: 'LNA.view.base.Panel',
    alias: 'widget.system_UserList_View',

    requires: ['LNA.view.system.user.FilterForm',
                'LNA.view.system.user.Grid'],

    title: '用户管理',
    layout: 'border',
    initComponent: function () {
        var store = Ext.create('Eway.store.person.organization.SerOrganizationTree');
        Ext.apply(this, {
            items: [{
                region: 'west',
                title: '部门菜单',
                header: false,
                xtype: 'treepanel',
                width: 200,
                border: false,
                padding: '0 2 0 0',
                rootVisible: true,
                lines: true,
                store: store
            }, {
                region: 'center',
                xtype: 'panel',
                layout: 'border',
                items: [{
                    region: 'north',
                    xtype: 'system_UserList_FilterForm'
                }, {
                    region: 'center',
                    xtype: 'system_UserList_Grid'
                }]
            }],
            listeners: {
                scope: this,
                activate: this.onReload
            }
        });

        this.callParent(arguments);
    },
    onReload: function (panel) {
        var store = panel.down('system_UserList_Grid').getStore();
        store.cleanUrlParam();
        store.load();
    }
});